﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Web.UI;

using LMD.Constant;
using LMD.Lib.Oracle;
using LMD.Lib.Controls;

public class LOV_FeedSource : LMD.Lib.Interface.ILOVProvider
{
    public LOV_FeedSource()
    {
        //
        // TODO: Add constructor logic here
        //
    }

    #region ILOVProvider Members

    public String DrawLOV(string sxControlId, string sxFilter, string sxCustomParam, int iIndex, int iPageSize)
    {
        sxFilter = sxFilter.Trim();
        Cached.FeedSource ccTmp = new Cached.FeedSource();
        DataTable dtTmp = ccTmp.GetFeedSourceList();
        return CustomControls.Create_LOVDrawer(sxControlId, dtTmp, iIndex, iPageSize, sxFilter, "ID", "NAME", false);
    }


    public String ShowInputForm(string sxControlId, string sxValue, string sxCustomParam)
    {
        String sxOutput = String.Empty;
        sxOutput = CustomControls.BuildEditor_PopupNewLOVItem(sxControlId, GetLOVName(), sxValue, false);
        return sxOutput;
    }

    public string GetLOVName()
    {
        return KLOV.Generic.FEEDSOURCE;
    }

    public string Insert2LOV(string sxValue, string sxCustomParam, TextboxType tpTextbox)
    {
        throw new NotImplementedException();
    }

    #endregion
}
